package com.gutai.admin.common.entity.response;

import java.util.List;

/**
 * 分页结果对象
 * 
 * @param <T>
 */
public class PageResponse<T> implements Response {

	/**
	 * 数据总条数
	 */
	private Long totalSize;

	/**
	 * 分页数据信息
	 */
	private List<T> result;

	/**
	 * 相应的结果
	 */
	private String succ;

	/**
	 * 提示信息，错误信息
	 */
	private String msg;

	public PageResponse() {
	}


	@Override
	public String toString() {
		return "PageResp{" + "totalSize=" + totalSize + ", objects=" + result
				+ '}';
	}

	public Long getTotalSize() {
		return totalSize;
	}

	public void setTotalSize(Long totalSize) {
		this.totalSize = totalSize;
	}

	public List<T> getResult() {
		return result;
	}

	public String getSucc() {
		return succ;
	}

	public void setSucc(String succ) {
		this.succ = succ;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	@SuppressWarnings("unchecked")
	@Override
	public void setResult(Object result) {
		this.result = (List<T>) result;
	}

}
